package com.qqt.csr.common.enums;

import lombok.Getter;

@Getter
public enum GenderEnum {

	UNKNOW(0, "未知"),MALE(1, "男"), FEMALE(2, "女");

	private int value;
	private String message;

	GenderEnum(int value, String message) {
		this.value = value;
		this.message = message;
	}

	public static GenderEnum of(int value) {
		for (GenderEnum genderEnum : GenderEnum.values()) {
			if (genderEnum.getValue() == value) {
				return genderEnum;
			}
		}
		return UNKNOW;
	}
}
